/*
 * Robot.h
 *
 *  Created on: 23.11.2011
 *      Author: jan
 */

#ifndef ROBOT_H_
#define ROBOT_H_

#include "Maze.h"
#include "Map.h"
#include "Particle.h"
#include "LocalizationFilter.h"

namespace std {

class Robot : public Particle<int> {
public:

	double speed;
	Maze * m;
	Map * map;
	int width;
	int height;
	double resol;
	bool drawn;
	bool bla;
	LocalizationFilter * filter;
	bool filter_init;
	bool hasFilter;
	bool showMap;
	bool showLikelyhoodMap;
	bool showFilterParticles;

	Robot(Maze* maze, int width, int height, int picHeight, int picWidth);
	Point getPosition(){return p;}

	void move();
	void drawMap();
	void chose_random_direction();
	void initFilter(unsigned int n);
	void enableFilter(bool hasFilter);
	void predictPosition(double old_heading);
	void setMaps(bool map, bool lmMap, bool filterParts);

	double getHeading();
	double read_sensor();

	virtual ~Robot();
};

} /* namespace std */
#endif /* ROBOT_H_ */
